package main.database;

import redis.clients.jedis.Jedis;

public class RedisMan {
    private static RedisMan instance;
    private Jedis jedis;

    private RedisMan() {

    }

    public static RedisMan Instance() {
        if (instance == null) {
            instance = new RedisMan();
        }
        return instance;
    }

    public void Init() {
        jedis = new Jedis("localhost");
    }

    public void Set(String key, Object value) {
        jedis.set(key, value.toString());
    }

    public Object Get(String key) {
        return jedis.get(key);
    }
}